package com.shxy.dao;

import com.shxy.entity.base.Major;
import com.shxy.entity.custom.MajorInService;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 运行中专业数据管理工具
 */
@Repository
public interface MajorInServiceDao extends JpaRepository<MajorInService, Integer> {

    /**
     * 根据学年和专业编号查询
     * @param year
     * @param major
     * @return
     */
    Optional<MajorInService> findByYearAndMajor(String year, Major major);
}
